﻿using System;

namespace UnityEngine.PostProcessing
{
	// Token: 0x02000109 RID: 265
	[Serializable]
	public class ScreenSpaceReflectionModel : PostProcessingModel
	{
		// Token: 0x170000E3 RID: 227
		// (get) Token: 0x06000506 RID: 1286 RVA: 0x00027D2E File Offset: 0x00025F2E
		// (set) Token: 0x06000507 RID: 1287 RVA: 0x00027D36 File Offset: 0x00025F36
		public ScreenSpaceReflectionModel.Settings settings
		{
			get
			{
				return this.m_Settings;
			}
			set
			{
				this.m_Settings = value;
			}
		}

		// Token: 0x06000508 RID: 1288 RVA: 0x00027D3F File Offset: 0x00025F3F
		public override void Reset()
		{
			this.m_Settings = ScreenSpaceReflectionModel.Settings.defaultSettings;
		}

		// Token: 0x04000708 RID: 1800
		[SerializeField]
		private ScreenSpaceReflectionModel.Settings m_Settings = ScreenSpaceReflectionModel.Settings.defaultSettings;

		// Token: 0x0200010A RID: 266
		public enum SSRResolution
		{
			// Token: 0x0400070A RID: 1802
			High,
			// Token: 0x0400070B RID: 1803
			Low = 2
		}

		// Token: 0x0200010B RID: 267
		public enum SSRReflectionBlendType
		{
			// Token: 0x0400070D RID: 1805
			PhysicallyBased,
			// Token: 0x0400070E RID: 1806
			Additive
		}

		// Token: 0x0200010C RID: 268
		[Serializable]
		public struct IntensitySettings
		{
			// Token: 0x0400070F RID: 1807
			[Range(0f, 2f)]
			[Tooltip("Nonphysical multiplier for the SSR reflections. 1.0 is physically based.")]
			public float reflectionMultiplier;

			// Token: 0x04000710 RID: 1808
			[Range(0f, 1000f)]
			[Tooltip("How far away from the maxDistance to begin fading SSR.")]
			public float fadeDistance;

			// Token: 0x04000711 RID: 1809
			[Range(0f, 1f)]
			[Tooltip("Amplify Fresnel fade out. Increase if floor reflections look good close to the surface and bad farther 'under' the floor.")]
			public float fresnelFade;

			// Token: 0x04000712 RID: 1810
			[Range(0.1f, 10f)]
			[Tooltip("Higher values correspond to a faster Fresnel fade as the reflection changes from the grazing angle.")]
			public float fresnelFadePower;
		}

		// Token: 0x0200010D RID: 269
		[Serializable]
		public struct ReflectionSettings
		{
			// Token: 0x04000713 RID: 1811
			[Tooltip("How the reflections are blended into the render.")]
			public ScreenSpaceReflectionModel.SSRReflectionBlendType blendType;

			// Token: 0x04000714 RID: 1812
			[Tooltip("Half resolution SSRR is much faster, but less accurate.")]
			public ScreenSpaceReflectionModel.SSRResolution reflectionQuality;

			// Token: 0x04000715 RID: 1813
			[Range(0.1f, 300f)]
			[Tooltip("Maximum reflection distance in world units.")]
			public float maxDistance;

			// Token: 0x04000716 RID: 1814
			[Range(16f, 1024f)]
			[Tooltip("Max raytracing length.")]
			public int iterationCount;

			// Token: 0x04000717 RID: 1815
			[Range(1f, 16f)]
			[Tooltip("Log base 2 of ray tracing coarse step size. Higher traces farther, lower gives better quality silhouettes.")]
			public int stepSize;

			// Token: 0x04000718 RID: 1816
			[Range(0.01f, 10f)]
			[Tooltip("Typical thickness of columns, walls, furniture, and other objects that reflection rays might pass behind.")]
			public float widthModifier;

			// Token: 0x04000719 RID: 1817
			[Tooltip("Blurriness of reflections.")]
			[Range(0.1f, 8f)]
			public float reflectionBlur;

			// Token: 0x0400071A RID: 1818
			[Tooltip("Disable for a performance gain in scenes where most glossy objects are horizontal, like floors, water, and tables. Leave on for scenes with glossy vertical objects.")]
			public bool reflectBackfaces;
		}

		// Token: 0x0200010E RID: 270
		[Serializable]
		public struct ScreenEdgeMask
		{
			// Token: 0x0400071B RID: 1819
			[Range(0f, 1f)]
			[Tooltip("Higher = fade out SSRR near the edge of the screen so that reflections don't pop under camera motion.")]
			public float intensity;
		}

		// Token: 0x0200010F RID: 271
		[Serializable]
		public struct Settings
		{
			// Token: 0x170000E4 RID: 228
			// (get) Token: 0x06000509 RID: 1289 RVA: 0x00027D4C File Offset: 0x00025F4C
			public static ScreenSpaceReflectionModel.Settings defaultSettings
			{
				get
				{
					return new ScreenSpaceReflectionModel.Settings
					{
						reflection = new ScreenSpaceReflectionModel.ReflectionSettings
						{
							blendType = ScreenSpaceReflectionModel.SSRReflectionBlendType.PhysicallyBased,
							reflectionQuality = ScreenSpaceReflectionModel.SSRResolution.Low,
							maxDistance = 100f,
							iterationCount = 256,
							stepSize = 3,
							widthModifier = 0.5f,
							reflectionBlur = 1f,
							reflectBackfaces = false
						},
						intensity = new ScreenSpaceReflectionModel.IntensitySettings
						{
							reflectionMultiplier = 1f,
							fadeDistance = 100f,
							fresnelFade = 1f,
							fresnelFadePower = 1f
						},
						screenEdgeMask = new ScreenSpaceReflectionModel.ScreenEdgeMask
						{
							intensity = 0.03f
						}
					};
				}
			}

			// Token: 0x0400071C RID: 1820
			public ScreenSpaceReflectionModel.ReflectionSettings reflection;

			// Token: 0x0400071D RID: 1821
			public ScreenSpaceReflectionModel.IntensitySettings intensity;

			// Token: 0x0400071E RID: 1822
			public ScreenSpaceReflectionModel.ScreenEdgeMask screenEdgeMask;
		}
	}
}
